<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
    <meta charset="UTF-8">
    <title>资讯列表</title>
    <meta name="page-view-size" content="1280*720">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/infoList.css">
    <script type="text/javascript" src="../lib/js/evm.js"></script>
    <script type="text/javascript" src="../lib/js/Evm_djyw.js"></script>
    <script type="text/javascript" src="../lib/js/key.js"></script>
    <script src="../lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/api.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/public.js" type="text/javascript" charset="utf-8"></script>
    
</head>

<body>
    <div class="theoretical-bg" id="helpMain">
        <div class="list-bg">
            <div class="list-con" id="list-con">
            </div>
            <div class="list-bottom">
                <div class="page-show" id="page_show">
                    <span id="now_page">0</span>
                    /
                    <span id="total_page">0</span>
                </div>
            </div>
        </div>
    </div>

</body>
<script>
    var modelIndex = {
        disUser: true,
        index: 0,//初始位置
        pageSize: 6,
        type: 1,
        listName: 'list-row', //模块名称
        containerId: 'list-con',//包含模块的标签id
        
    }
    if(TV.GetParam('id') == 1059){
        var mess = '社会治理';
        TV.structure(mess)
    }else if(TV.GetParam('id') == 1060){
        var mess = '创业就业';
        TV.structure(mess)
    }
    
    
    function getMessage(page, pageSize, pos, index) {
        var param = {
            page: page,
            pagesize: pageSize,
            cid:TV.GetParam('id'),
            area_id: $.cookie('TV_CST_AREA'),
            device:'tv'
        }
        GetDatas('getArticleList', param, function (err, res) {
        // GetDatas('getArticleList', param, function (err, res) {
            var mess = res.data;
            var str = '';
            if (mess.items.length > 0) {
                for (var i = 0; i < mess.items.length; i++) {
                    str += "<div class='list-row' data-id=" + mess.items[i].id + " data-tpe=" + mess.items[i].tpe + " >";
                    //通过数组的方式 将所有的对应项都输出来
                    
                    str += "<div class='list-title'>" + mess.items[i].title + "</div>";
                    str += "<div class='list-time'>" + mess.items[i].add_time + "</div>";
                    str += "</div>"
                }
            }
            $('#list-con').html(str);
            $('#now_page').html(page)
            $('#total_page').html(mess.totalpage)
            right.index = index ? index : pos == 'previous' ? pageSize - 1 : 0;
            right.initialization();
            right.toggleFocus(right.index);


        })
        // right.toggleFocus();
    }



    function direEnter(index) {

        var tpe = $('.active').attr('data-tpe');
        if (tpe == 4 || tpe == 5) {
            window.location.href = 'play.html?id=' + $('.active').attr('data-id');
        } else if (tpe == 1 || tpe == 2 || tpe == 3) {
            // if (tpe == 3) {
            //     window.location.href = './carrousel.html?id=' + $('.active').attr('data-id')
            //     return
            // }
            var locaName = tpe == 1 ? 'word' : 'article'
            window.location.href = locaName + 'Detail.html?id=' + $('.active').attr('data-id');
        }
        
        // window.location.href = 'detailPage.html?id='+$('.active').attr('data-id');

    }
</script>
<script type="text/javascript" src="../js/pageList.js"></script>

</html>